package com.practise.demo.controller;

import com.practise.demo.model.BookInfo;
import com.practise.demo.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@ResponseBody
@RequestMapping("/book")
public class BookController {
    @Autowired
    private BookService bookService ;
    @PostMapping("/getList")
    public List<BookInfo> getList(){
        return bookService.getList();
    }
}
